import request from '@/utils/request'

// 查询类别
export function queryCategory() {
  return request({
    url: 'product-category/getAll',
    method: 'get'
  })
}

export function updateCategory(data) {
  return request({
    url: 'product-category/',
    method: 'put',
    data
  })
}
export function removeCategory(categoryId) {
  return request({
    url: `product-category/${categoryId}`,
    method: 'delete'
  })
}
export function addCategory(data) {
  return request({
    url: 'product-category/',
    method: 'post',
    data
  })
}
